package pers.lan.stack;

import java.util.Stack;

/**
 * @author <p><a href="mailto:1728209643@qq.com">XiaoSan</a>
 * @date 2019/9/6 10:50 AM
 */
public class LC_224 {

    public static void main(String[] args) {
        System.out.println(
                new LC_224()
                        .calculate("(1+(4+5+2)-3)+(6+8)")
        );
    }

    public int calculate(String s) {
        char[] chars = s.toCharArray();
        Stack<String> stack = new Stack<>();
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] < '0') {
                if (sb.length() != 0) {
                    stack.push(sb.toString());
                    sb = new StringBuilder();
                }
                stack.push(String.valueOf(chars[i]));
            } else {
                sb.append(chars[i]);
            }

        }

        return 0;
    }
}
